package org.check.login;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;

/**
 * 验证是否登录
 * @author Administrator
 */
public class CheckLogin {
	
	@Autowired
	private StringRedisTemplate redis;
	
	/**
	 * 验证是否登录
	 * @return
	 */
	public boolean isLogin()
	{
		if (this.redis.opsForValue().get("admin_id") != null) {
			return true;
		}
		return false;
	}
}
